

#include "stdafx.h"
#include "calc.h"

int _tmain(int argc, _TCHAR* argv[])
{
	int n;
	float f;
	if(argc >= 3)
	{
		n = _ttoi(argv[1]);		//convert _tchar* to int value
		f = _ttof(argv[2]);	//convert _tchar* to float value
	}
	if(n == NULL) n = 5;
	if(f == NULL) f = 3.8;

	int result1 = factorial(n);
	int result2 = factorial(f);
	printf("Result of factorial(%d) = %d\n", n, result1); 
	printf("Result of factorial(%1.1f) = %d\n", f, result2);
	getchar();
}

